<?	session_start(); 
	if(isset($_SESSION['id']) & isset($_SESSION['pass']))
	{
	require("koneksi.php");
	$query=mysql_query("select * from biodata where nrp like '611%' order by nrp");
	
?>
<center>
<table border="1">
	<th colspan="5">
		Tampilan Semua Data Mahasiswa Bahasa Tionghoa
	</th>
	<tr>
		<td>NRP</td>
		<td>Nama</td>
		<td>Password</td>
		<td colspan="2">Action</td>
	</tr>
	<?
		while ($row=mysql_fetch_row($query))
		{
			$query2=mysql_query("select * from security where username='$row[0]'");
			
			echo "<tr><td>$row[0]</td>
			<td>$row[1]</td>";
			while($row2=mysql_fetch_row($query2))
			{
				
				if(empty($row2[1]))
				{
					echo "<td> Tidak/Belum Ada </td>";
				}
				else
				{
					echo "<td>$row2[1]</td>";
				}
			}
			echo "<td><a href=form_edit_mhs.php?nrp=$row[0]>Edit</a></td>
			<td><a href=del_mhs.php?nrp=$row[0]>Delete</a></td>
			</tr>";
			
		}?>
	<tr>
		<td colspan="5"><a href="form_add_mhs.php">Tambah Mahasiswa</a></td>
	</tr>
	<tr>
		<td colspan="5"><a href="menu_admin.php">Back to Menu Admin</a></td>
	</tr>
</table>
</center>
<? 
	}
	else
	echo "Silahkan <a href='index.php'>Login</a> dulu.";
?>